package org.example.demo.service;

import org.example.demo.beans.Department;
import org.example.demo.pojo.DepDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DepService {
    @Autowired
    private DepDao depDao;

    public int add(Department department){
        return depDao.add(department);
    }

    public int del(Integer id){
        return depDao.del(id);
    }

    public int update(Department department){
        return depDao.update(department);
    }

    public Department get(Integer id){
        return depDao.get(id);
    }

    public List<Department> getAll(){
        return depDao.getAll();
    }
}
